//
//  GCDSocketManager.h
//  XiAnJMApp
//
//  Created by Kai Wang on 2017/5/24.
//  Copyright © 2017年 Kai Wang. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "GCDAsyncSocket.h"
/**
 *  业务类型
 */
typedef NS_ENUM(NSInteger, GACRequestType) {
    GACRequestType_Beat = 1,                       //心跳
    GACRequestType_GetConversationsList,           //获取会话列表
    GACRequestType_ConnectionAuthAppraisal = 7,        //连接鉴权
};
typedef void (^SocketDidReadBlock)(NSError *__nullable error, id __nullable data);
@interface GCDSocketManager : NSObject

@property (nonatomic,assign)BOOL isConect;
@property(nonatomic,strong) GCDAsyncSocket *socket;

//单例
+ (instancetype)sharedSocketManager;

//连接
- (void)connectToServer;

//断开
- (void)cutOffSocket;

/*
 * 登录
 */
-(void)Action_Login;

@end
